import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/problem_report_type_entity.dart';

ProblemReportTypeEntity $ProblemReportTypeEntityFromJson(Map<String, dynamic> json) {
	final ProblemReportTypeEntity problemReportTypeEntity = ProblemReportTypeEntity();
	final List<ProblemTypeList>? problemTypeList = jsonConvert.convertListNotNull<ProblemTypeList>(json['problemTypeList']);
	if (problemTypeList != null) {
		problemReportTypeEntity.problemTypeList = problemTypeList;
	}
	final List<ProblemTypeList>? taskTypeList = jsonConvert.convertListNotNull<ProblemTypeList>(json['taskTypeList']);
	if (taskTypeList != null) {
		problemReportTypeEntity.taskTypeList = taskTypeList;
	}
	return problemReportTypeEntity;
}

Map<String, dynamic> $ProblemReportTypeEntityToJson(ProblemReportTypeEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['problemTypeList'] =  entity.problemTypeList?.map((v) => v.toJson()).toList();
	data['taskTypeList'] =  entity.taskTypeList?.map((v) => v.toJson()).toList();
	return data;
}

ProblemTypeList $ProblemTypeListFromJson(Map<String, dynamic> json) {
	final ProblemTypeList problemTypeList = ProblemTypeList();
	final List<ListChildTypeList>? childTypeList = jsonConvert.convertListNotNull<ListChildTypeList>(json['childTypeList']);
	if (childTypeList != null) {
		problemTypeList.childTypeList = childTypeList;
	}
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		problemTypeList.code = code;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		problemTypeList.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		problemTypeList.name = name;
	}
	final String? pid = jsonConvert.convert<String>(json['pid']);
	if (pid != null) {
		problemTypeList.pid = pid;
	}
	final String? problemCount = jsonConvert.convert<String>(json['problemCount']);
	if (problemCount != null) {
		problemTypeList.problemCount = problemCount;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		problemTypeList.type = type;
	}
	return problemTypeList;
}

Map<String, dynamic> $ProblemTypeListToJson(ProblemTypeList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['childTypeList'] =  entity.childTypeList?.map((v) => v.toJson()).toList();
	data['code'] = entity.code;
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['pid'] = entity.pid;
	data['problemCount'] = entity.problemCount;
	data['type'] = entity.type;
	return data;
}

ListChildTypeList $ListChildTypeListFromJson(Map<String, dynamic> json) {
	final ListChildTypeList listChildTypeList = ListChildTypeList();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		listChildTypeList.code = code;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		listChildTypeList.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		listChildTypeList.name = name;
	}
	final String? pid = jsonConvert.convert<String>(json['pid']);
	if (pid != null) {
		listChildTypeList.pid = pid;
	}
	final String? problemCount = jsonConvert.convert<String>(json['problemCount']);
	if (problemCount != null) {
		listChildTypeList.problemCount = problemCount;
	}
	return listChildTypeList;
}

Map<String, dynamic> $ListChildTypeListToJson(ListChildTypeList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['pid'] = entity.pid;
	data['problemCount'] = entity.problemCount;
	return data;
}